package com.unbank.search;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

import com.unbank.values.SysParameters;

public class SearchClientFactory {
	
	private static Client client;
	private SearchClientFactory(){}
	
	public static Client getClient(){
		if(client==null){
			client = new TransportClient().addTransportAddress(new InetSocketTransportAddress(SysParameters.ESHOST, 9300));
		}
		return client;
	}
	
}
